Install XAMPP
-------------------------------------------------------------
https://www.apachefriends.org/index.html
During install, select Apache, MySQL, PHP, phpMyAdmin. The rest is not neeeded.
After install, run C:\xampp\xampp-control.exe. Run always as administrator.
Click the red crosses under Service to install Apache and MySQL services.

In case you have concerns about security 
(your firewall and router should protect you by blocking incoming connections)
then disconnect your computer from internet. XAMPP server will work regardless.
And of course, turn off running at startup for Apache and MySQL services.



Install PHP 5.4.0
--------------------------------------------------------------
https://windows.php.net/downloads/releases/archives/
Download php-5.4.0-nts-Win32-VC9-x86.zip.
Extract to C:\xampp\php54\ so that php.exe etc. were directly in php54 folder (not in subfolder)
Make a copy of php.ini-development file and rename it to php.ini.
In php.ini uncomment following lines
  extension_dir = "ext"
  extension=php_gd2.dll 
  extension=php_mysql.dll
And change short_open_tag = Off to short_open_tag = On.
Save changes in php.ini.

In XAMPP control panel click on Config next to Apache and choose "Apache (httpd-xampp.conf)".
Comment out line 'SetEnv PHPRC "\\path\\to\\xampp\\php"' using #
Add following lines to end of the file:

ScriptAlias /php54 "C:/xampp/php54"
Action application/x-httpd-php54-cgi /php54/php-cgi.exe
<Directory "C:/xampp/php54">
    AllowOverride None
    Options None
    Require all denied
    <Files "php-cgi.exe">
        Require all granted
    </Files>
</Directory>
<Directory "C:\xampp\htdocs">
    <FilesMatch "\.php$">
        SetHandler application/x-httpd-php54-cgi
    </FilesMatch>
</Directory>

Save and close.



Move X-Ray web to XAMPP
-----------------------------------------------------------------
Delete contents of C:\xampp\htdocs\
Copy contents of x-ray.clanweb.eu folder (the php files) into C:\xampp\htdocs\



Import MySQL database
-----------------------------------------------------------------
In XAMPP control panel start Apache and MySQL and click on Admin next to MySQL.
There will be phpMyAdmin in your web browser.
Go to User accounts tab. Add new one, name 'cwxraydb', password 'admini5trac3sq|x|ray' and all privileges.

Go to Databases tab. Create new one named 'cwxray', type utf8mb4_general_ci.
Select it on the left panel and go to Import tab.
Click on Browse, select cwxray.sql and at the bottom of the page click on Go button.
Wait. Once finished close the browser.



Run X-Ray web
-------------------------------------------------------------------
In XAMPP control panel start Apache and MySQL (restart if they are running).
Open any web browser and go to localhost:80/show.php?f=echo_new address.
You can sign in as any existing user, there is no password.
Login is the same as account name, just look around the web and pick from the names you can spot.
Chat and admin chat do not show entire history, you can find the rest in database 
-> Admin button next to MySQL in XAMPP control panel.
PHP source files have been modified to run at localhost and some errors were fixed.
